/**
 * Created by 白雨浓 on 2019/7/7 15:02.
 */
const SCHEMATA = {
  selectList: () => {
    return [
      'SELECT SCHEMA_NAME FROM `SCHEMATA`'
    ]
  }
};

const TABLES = {
  selectList: (TABLE_SCHEMA) => {
    return [
      'SELECT * FROM `TABLES` WHERE TABLE_SCHEMA = ? AND TABLE_TYPE = "BASE TABLE"',
      [TABLE_SCHEMA]
    ]
  }
};

const COLUMNS = {
  selectList: (TABLE_SCHEMA, TABLE_NAME) => {
    return [
      'SELECT * FROM `COLUMNS` WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ?',
      [TABLE_SCHEMA, TABLE_NAME]
    ]
  }
};

export { SCHEMATA, TABLES, COLUMNS }
